<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户管理系统</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/styles.css">
    </style>
</head>
<body>
<div class="header">
    <span class="header-title">用户管理系统</span>
    <span class="header-right">
          <span class="welcome-text">  欢迎<c:out value="${sessionScope.user.username}" default="游客"/>,</span>
          <span><a class="login-link" href="${pageContext.request.contextPath}/logout">注销</a></span>
        </span>
</div>
<div class="sidebar">
    <div class="sidebar-header">
        <img src="${pageContext.request.contextPath}/images/bookshelf.png" alt="Library Icon">
    </div>
    <a href="#" class="level-1">用户管理</a>
    <a href="${pageContext.request.contextPath}/books?action=list" class="level-2">用户列表</a>
    <a href="${pageContext.request.contextPath}/books?action=showForm" class="level-2">添加用户</a>
    <a href="#" class="level-1">系统管理</a>
    <a href="${pageContext.request.contextPath}/system?action=log" class="level-2">操作日志</a>
    <a href="#" class="level-1">用户中心</a>
    <a href="${pageContext.request.contextPath}/user?action=changePassword" class="level-2">修改密码</a>
</div>
<div class="main-content">
    <h3>用户列表</h3>
    <a href="${pageContext.request.contextPath}/books?action=showForm">添加用户</a>
    <table border="1">

    </table>
    <p></p> @edu XXX大学计算机学院 班级:xxx, 学号:xx, 姓名:xxx <p></p>
</div>

<script type="text/javascript">
    function confirmDelete(bookId) {
        if (confirm("确定要删除这个用户吗？")) {
            window.location.href = "${pageContext.request.contextPath}/users?action=delete&id=" + bookId;
        }
    }
</script>
</body>
</html>
